<div class="pd">
    <form method="post" id="site_roles_form" action="site-roles/save.action">
        <input type="hidden" name="id" value="${id}">
        <#if roles??>
            <table>
                <tr>
                    <td>用户名</td>
                    <td><input class="easyui-textbox" data-options="required:true" name="role" value="${roles.role}" type="text">
                    </td>
                </tr>
                <tr>
                    <td>描&nbsp;&nbsp;述</td>
                    <td><input class="easyui-textbox" data-options="required:true" name="description" value="${roles.description}"
                               type="text"></td>
                </tr>
            </table>
            <#else>
            <table>
                <tr>
                    <td>用户名</td>
                    <td><input class="easyui-textbox" data-options="required:true" type="text" name="role"></td>
                </tr>
                <tr>
                    <td>描&nbsp;&nbsp;述</td>
                    <td><input class="easyui-textbox" data-options="required:true" type="text" name="description"></td>
                </tr>
            </table>
        </#if>
    </form>
    <div style="text-align:left;padding:5px">
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="site_roles_submitform()">提交</a>
    </div>
</div>
<script>
    function site_roles_submitform() {
        $('#site_roles_form').form('submit',{
            success:function(data){
                if(data.code == 10000){
                    loadCurrent('角色管理','../site-roles/index.action');
                }
            }
        });
    }
</script>
